/**
 * @author KujoMiva
 * @name reply.js
 * @desc 回复模块的 store
 * @time 2020年04月06日 12:40:49 星期一
 */
// import * as replyRequest from '@/api/reply';

export default {
    namespaced: true,
    state: {
        oid: 0,
        page: {
            num: 1,
            size: 20,
            count: 0,
            acount: 0,
        },
        replies: [],
    },
    mutations: {
        SAVE_REPLY_DATA: (state, data) => {
            console.log(data);
            state.replies = data.replies;
            state.page = data.page;
        },
    },
    actions: {
        // async getReplysV2({ state, commit }, { oid, sort }) {
        //     const { num, size } = state.page;
        //     // const { data } = await replyRequest.getReplysV2({ oid, sort, num, size });
        //     // 这里储存一页的回复数据
        //     commit('SAVE_REPLY_DATA', data);
        // },
    },
};
